const Mock = require('mockjs')
const Random = Mock.Random;
module.exports = {
    "/platform/platform/getBannerList": function (body) {
        //所有列表
        let data = Mock.mock(
            {
                "count": 18,
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": [
                    {
                        "createTime": "2018-06-25 14:43:48",
                        "gameBannerName": "ghbjnkml",
                        "gameBannerNo": 18,
                        "gameBannerSortingint": -4,
                        "gameBannerStatus": 1,
                        "gameBannerText": "cvbnm,./",
                        "gameBannerType": 0,
                        "gameBannerUrl": "cvbnm,.",
                        "gameImage": "paqc1mgwr.bkt.clouddn.com/FgAG69APY9Dcr3l9DTHvBOhG7i6o"
                    },
                    {
                        "createTime": "2018-06-23 22:02:46",
                        "gameBannerName": "我们11",
                        "gameBannerNo": 16,
                        "gameBannerSortingint": -3,
                        "gameBannerStatus": 1,
                        "gameBannerText": " 呜呜呜",
                        "gameBannerType": 0,
                        "gameBannerUrl": "呜呜呜呜",
                        "gameImage": "paqc1mgwr.bkt.clouddn.com/FgAG69APY9Dcr3l9DTHvBOhG7i6o"
                    },
                    {
                        "createTime": "2018-06-22 14:30:30",
                        "gameBannerName": "活动",
                        "gameBannerNo": 5,
                        "gameBannerSortingint": 1,
                        "gameBannerStatus": 1,
                        "gameBannerText": "描述",
                        "gameBannerType": 1,
                        "gameBannerUrl": "www.baidu.com",
                        "gameImage": "paqc1mgwr.bkt.clouddn.com/http://pao24fe4y.sabkt.gdipper.com/%E6%9C%AA%E6%A0%87%E9%A2%98-1.png"
                    },
                    {
                        "createTime": "2018-06-22 14:30:30",
                        "gameBannerName": "活动",
                        "gameBannerNo": 6,
                        "gameBannerSortingint": 1,
                        "gameBannerStatus": 1,
                        "gameBannerText": "描述",
                        "gameBannerType": 2,
                        "gameBannerUrl": "www.baidu.com",
                        "gameImage": "paqc1mgwr.bkt.clouddn.com/http://pao24fe4y.sabkt.gdipper.com/%E6%9C%AA%E6%A0%87%E9%A2%98-1.png"
                    }
                ],
                "totalPage": 5
            })
        //重现单个数据
        let dataOne = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": [{
                    "createTime": "2018-06-25 14:43:48",
                    "gameBannerName": "ghbjnkml",
                    "gameBannerNo": 18,
                    "gameBannerSortingint": -4,
                    "gameBannerStatus": 1,
                    "gameBannerText": "cvbnm,./",
                    "gameBannerType": 0,
                    "gameBannerUrl": "cvbnm,.",
                    "gameImage": "paqc1mgwr.bkt.clouddn.com/FgAG69APY9Dcr3l9DTHvBOhG7i6o"
                }]
            });
        return body.gameBannerNo ? dataOne : data;
    },
    "/platform/platform/saveBanner": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
    "/platform/platform/updateBanner": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
    "/platform/platform/getrolelist": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "count": 18,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Number": 18,
                        "Status": 0,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1"
                    },
                    {
                        "Name": Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2"
                    }
                ],
                "totalPage": 5
            })
        //重现单个数据--
        let dataOne = Mock.mock(
            {
                "count": 10,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": body.name,
                        "Number": 18,
                        "Status|1": [0, 1],
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2",
                    },
                    {
                        "Name": body.name + Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1"
                    }
                ],
                "totalPage": 2
            })
        return body.name ? dataOne : data;
    },
    "/platform/platform/addrole": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
    "/platform/platform/updaterole": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
    "/platform/platform/permission": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj|10": [
                    {
                        label: "系统管理"+Mock.mock('@cword(3)'),
                        "list|10": [
                            {
                                label: "模拟"+Mock.mock('@cword(2)')+"权限",
                                "list|2": [
                                    {
                                        label: "新增",
                                        "val|+1": 200,
                                        "ok|1": [1,0],//1表示ok,0表示禁用
                                        "select|1":[true,false]//1表示选中，0表示不选择
                                    }
                                ]
                            }
                        ]
                    }
                ]
            });
            let saveData = Mock.mock(
                {
                    "msg": "SUCCESS",
                    "page": 1,
                    "resCode": 1,
                    "resObj": []
                });
        return body.data?saveData:data;
    },

    "/platform/platform/updateparams": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
    "/platform/platform/getparamslist": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "count": 18,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Number": 18,
                        "Status": 0,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1"
                    },
                    {
                        "Name": Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2"
                    }
                ],
                "totalPage": 5
            })
        //重现单个数据--
        let dataOne = Mock.mock(
            {
                "count": 10,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": body.name,
                        "Number": 18,
                        "Status|1": [0, 1],
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2",
                    },
                    {
                        "Name": body.name + Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1"
                    }
                ],
                "totalPage": 2
            })
        return body.name ? dataOne : data;
    },
    "/platform/platform/getparamslog": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Time": Random.datetime('yy-MM-dd a HH:mm:ss'),
                        "Text": Mock.mock('@sentence(3, 5)'),
                    }
                ]
            })
  
        return data;
    },
    "/platform/platform/getLoginLoglist": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "count": 18,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "account":Mock.mock('@email'),
                        "name": Random.last(),
                        "position":Mock.mock('@cname'),
                        "department":Mock.mock('@city') ,
                        "role":Mock.mock('@region'),
                        "ip":Mock.mock('@ip'),
                        "position": 1,
                        "time":Random.datetime('yyyy-MM-dd A HH:mm:ss'),
                        id: "2"
                    },
                    {
                        "account":Mock.mock('@email'),
                        "name": Random.last(),
                        "position":Mock.mock('@cword(3)'),
                        "department":Mock.mock('@city') ,
                        "role":Mock.mock('@region'),
                        "ip":Mock.mock('@ip'),
                        "position": 1,
                        "time":Random.datetime('yyyy-MM-dd A HH:mm:ss'),
                        id: "2"
                    }
                ],
                "totalPage": 5
            })
        //重现单个数据--
        let dataOne = Mock.mock(
            {
                "count": 10,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "account":Mock.mock('@email'),
                        "name": body.name +Random.last(),
                        "position":Mock.mock('@cname'),
                        "department":Mock.mock('@city') ,
                        "role":Mock.mock('@region'),
                        "ip":Mock.mock('@ip'),
                        "position": 1,
                        "time":Random.datetime('yyyy-MM-dd A HH:mm:ss'),
                        id: "2"
                    },
                    {
                        "account":Mock.mock('@email'),
                        "name": body.name +Random.last(),
                        "position":Mock.mock('@cname'),
                        "department":Mock.mock('@city') ,
                        "role":Mock.mock('@region'),
                        "ip":Mock.mock('@ip'),
                        "position": 1,
                        "time":Random.datetime('yyyy-MM-dd A HH:mm:ss'),
                        id: "2"
                    }
                ]
            })
        return body.name ? dataOne : data;
    },
    "/platform/platform/getmenbergradelist": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "count": 18,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Number": 18,
                        "Status": 0,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1"
                    },
                    {
                        "Name": Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2"
                    }
                ],
                "totalPage": 5
            })
        //重现单个数据--
        let dataOne = Mock.mock(
            {
                "count": 10,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": body.name,
                        "Number": 18,
                        "Status|1": [0, 1],
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2",
                    },
                    {
                        "Name": body.name + Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1"
                    }
                ],
                "totalPage": 2
            })
        return body.name ? dataOne : data;
    },
    "/platform/platform/getMenberGradeLogList": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Time": Random.datetime('yy-MM-dd a HH:mm:ss'),
                        "Text": Mock.mock('@sentence(3, 5)'),
                    }
                ]
            })
  
        return data;
    },
    "/platform/platform/updateMenberGrade": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
     "/platform/platform/getmenbergradelist": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "count": 18,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Number": 18,
                        "Status": 0,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1"
                    },
                    {
                        "Name": Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2"
                    }
                ],
                "totalPage": 5
            })
        //重现单个数据--
        let dataOne = Mock.mock(
            {
                "count": 10,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": body.name,
                        "Number": 18,
                        "Status|1": [0, 1],
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2",
                    },
                    {
                        "Name": body.name + Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1"
                    }
                ],
                "totalPage": 2
            })
        return body.name ? dataOne : data;
    },
    "/platform/platform/getMenberGradeLogList": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Time": Random.datetime('yy-MM-dd a HH:mm:ss'),
                        "Text": Mock.mock('@sentence(3, 5)'),
                    }
                ]
            })
  
        return data;
    },
    "/platform/platform/updateMenberGrade": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
    //-----短信通道-------
    "/platform/platform/getNoteList": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "count": 18,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Number": 18,
                        "Status": 0,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1",
                        "sort|+1":1
                    },
                    {
                        "Name": Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2",
                        "sort|+1":300
                    }
                ],
                "totalPage": 5
            })
        //重现单个数据--
        let dataOne = Mock.mock(
            {
                "count": 10,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": body.name,
                        "Number": 18,
                        "Status|1": [0, 1],
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2",
                        "sort|+1":1
                    },
                    {
                        "Name": body.name + Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1",
                        "sort|+1":900
                    }
                ],
                "totalPage": 2
            })
        return body.name ? dataOne : data;
    },
    "/platform/platform/getNoteLogList": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Time": Random.datetime('yy-MM-dd a HH:mm:ss'),
                        "Text": Mock.mock('@sentence(3, 5)'),
                    }
                ]
            })
  
        return data;
    },
    "/platform/platform/updateNote": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
    // ---------消息参数设置------------
    "/platform/platform/getInfoParamsList": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "count": 18,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Number": 18,
                        "Status": 0,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1",
                        "sort|+1":1
                    },
                    {
                        "Name": Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2",
                        "sort|+1":300
                    }
                ],
                "totalPage": 5
            })
        //重现单个数据--
        let dataOne = Mock.mock(
            {
                "count": 10,
                "msg": "SUCCESS",
                "page": body.page ? Number(body.page) : 1,
                "resCode": 1,
                [res]: [
                    {
                        "Name": body.name,
                        "Number": 18,
                        "Status|1": [0, 1],
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "2",
                        "sort|+1":1
                    },
                    {
                        "Name": body.name + Random.word(),
                        "Number": 19,
                        "Status": 1,
                        "Text": Mock.mock('@sentence(3, 5)'),
                        id: "1",
                        "sort|+1":900
                    }
                ],
                "totalPage": 2
            })
        return body.name ? dataOne : data;
    },
    "/platform/platform/getInfoParamsLogList": function (body) {
        console.log(body)
        let res = body.limits ? "resObj|" + body.limits : "resObj|5";
        //所有列表
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "resCode": 1,
                [res]: [
                    {
                        "Name": Random.word(),
                        "Time": Random.datetime('yy-MM-dd a HH:mm:ss'),
                        "Text": Mock.mock('@sentence(3, 5)'),
                    }
                ]
            })
  
        return data;
    },
    "/platform/platform/updateInfoParams": function (body) {
        let data = Mock.mock(
            {
                "msg": "SUCCESS",
                "page": 1,
                "resCode": 1,
                "resObj": []
            });
        return data;
    },
    
};

